﻿using System.IO;

namespace unTroublemaker.Conditions
{
    public class FileExistsCondition : SpecificationItemBase
    {
        private readonly string _path;

        public FileExistsCondition(string path)
        {
            _path = path;
        }

        public bool Test()
        {
            return File.Exists(_path);
        }

        
        protected override bool RunTest()
        {
            return File.Exists(_path);
        }

        public override string DisplayName
        {
            get { return "Check if file exists at " + _path; }
        }
    }
}
